package kr.hkit.powerjava.chapter14;

import java.awt.GridLayout;
import java.awt.HeadlessException;

import javax.swing.JButton;
import javax.swing.JFrame;

class MyFrameGrid extends JFrame{

	public MyFrameGrid() throws HeadlessException {
		setTitle("GridLayoutTest");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		setLayout(new GridLayout(0,3));
		add(new JButton("AAA"));
		add(new JButton("BBB"));
		add(new JButton("CCC"));
		add(new JButton("DDD"));
		add(new JButton("EEE"));
		add(new JButton("FFF"));
		
		pack();
		setVisible(true);
	}
	
}
public class GridTest {

	public static void main(String[] args) {
		MyFrameGrid f = new MyFrameGrid();
	}
}
